package org.example.exception;

import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

@RestControllerAdvice
public class GolbalExceptionAdvice {

    @ExceptionHandler(value = BusinessException.class)
    public String handleException(BusinessException ex) {
        return ex.getMessage();
    }
}
